
// 客户订单
import axios from '@/apis/axios/index.js'
import axiosp from '@/apis/axios/indexp.js'
const baseUrl = `/erp/bill`



// 获取付款单列表
export function getlist(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/listPage`,
		method: 'post',
		data: params
	})
}

// 获取付款单列表
export function getSaleReturnlist(params) {
	return axiosp.request({
		url: `${baseUrl}/bill/saleReturn/listPage`,
		method: 'post',
		data: params
	})
}


export function listOptionsPage(params) {
	return axios.request({
		url: `/erp/customer/listOptionsPage`,
		method: 'post',
		data: params
	})
}


// 
export function initAddBill(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/initAddBill`,
		method: 'post',
		data: params
	})
}


// 新增客户订单
export function addData(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/addData`,
		method: 'post',
		data: params
	})
}
// 新增客户订单
export function updateViewBillAndDetailsByBillId(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/viewBillAndDetailsByBillId`,
		method: 'post',
		data: params
	})
}
// 编辑

export function updateData(params) {
	return axios.request({
		url: `/erp/bill/saleReserve/updateData`,
		method: 'post',
		data: params
	})
}
// 删除客户订单
export function deleteById(params) {
	return axios.request({
		url: `/erp/bill/saleReserve/deleteById`,
		method: 'post',
		data: params
	})
}
// 审核
export function audit(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/passSettle`,
		method: 'post',
		data: params
	})
}

// 作废
export function saleCancel(params) {
	return axiosp.request({
		url: `${baseUrl}/saleReserve/antiSettle`,
		method: 'post',
		data: params
	})
}

// 获取可发匹数
export function getOneLineCanUseStockByStockUnique(params) {
	return axiosp.request({
		url: `/erp/stockQuery/getOneLineCanUseStockByStockUnique`,
		method: 'post',
		data: params
	})
}
